package com.lvy.hczn.front.system.domain.business;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lvy.hczn.front.common.core.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 货箱详情管理
 *
 * @author yw
 * @date 2022-04-01 13:35:50
 **/
@Data
@TableName("goods_box_detail")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "货箱详情管理")
public class GoodsBoxDetail extends BaseModel<GoodsBox> {

    @ApiModelProperty("货箱编号")
    private String boxCode;

    @ApiModelProperty("入库单")
    private String entryCode;

    @ApiModelProperty("入库实际称重总重量")
    private BigDecimal weight;

    @ApiModelProperty("采购重量")
    private BigDecimal purchaseWeight;

    @ApiModelProperty(value = "保质期")
    private Integer warrantyDate;

    @ApiModelProperty(value = "生产日期")
    private LocalDateTime produceDate;

    @ApiModelProperty("批次编号")
    private String batchCode;

    @ApiModelProperty("商品编号")
    private String goodsCode;

    @ApiModelProperty("原材料id")
    private String spuId;

    @ApiModelProperty(value = "sku编码")
    private String skuCode;

    @ApiModelProperty(value = "规格编码")
    private String specCode;

    @ApiModelProperty("采购单")
    private String purchaseOrderCode;

    @ApiModelProperty("销售单")
    private String saleOrderCode;

    @ApiModelProperty("数量")
    private Integer quantity;

    @ApiModelProperty(value = "标品每箱包含的物件数量/份数")
    private Integer numberOfPerBox;

    @ApiModelProperty(value = "标品每份重量")
    private BigDecimal weightOfPerBox;

    @ApiModelProperty("单位")
    private String unit;

    @ApiModelProperty(value = "单位体积(每份/件/箱体积)")
    private BigDecimal volume;

    @ApiModelProperty(value = "保质期(品类保质期预留，入库单输入保质期为主，供应商乱输保质期不管，入库单保质期>原料保质期>品类保质期)")
    private LocalDate shelfLife;

    @ApiModelProperty("原材料等级")
    private String spuGradeId;

    @ApiModelProperty("生产商")
    private String producerId;

    @ApiModelProperty("供应商")
    private String supplierCode;

    @ApiModelProperty("是否散装包装：0，否；1，是；非散装未标准包装，已打包好了，一包一包拿，无需称重")
    private boolean inBulk;

    @ApiModelProperty("是否合箱物品（0、否；1、是），分拣时，合箱先出库")
    private boolean inMerge;

    @ApiModelProperty("是否退货入库商品（0、否；1、是）")
    private boolean inReturn;

    @ApiModelProperty("货箱层(货箱可包含N层)")
    private Integer boxLayer;

    @ApiModelProperty(value = "生产加工方式")
    private String materialProcessId;

    @ApiModelProperty(value = "原料名称")
    @TableField(exist = false)
    private String spuName;

    @ApiModelProperty("实际存储温区")
    @TableField(exist = false)
    private String actTemperatureCode;

    @ApiModelProperty("货箱状态")
    @TableField(exist = false)
    private String boxStatus;

    @ApiModelProperty("货箱误差，分拣时，误差之内的忽略（如变为空箱时，重量且在货箱范围内，则认为空箱）")
    @TableField(exist = false)
    private String errorMax;

    @ApiModelProperty("原材料编码")
    @TableField(exist = false)
    private String spuCode;

    @ApiModelProperty(value = "包装袋ID")
    @TableField(exist = false)
    private String packId;

    @ApiModelProperty(value = "仓库号")
    @TableField(exist = false)
    private Integer warehouseNumber;

    @ApiModelProperty(value = "合箱货箱标识，true表示合箱到这个货箱")
    @TableField(exist = false)
    private boolean mergeFlag;
}
